package com.dxc.untils.result;

import com.baomidou.mybatisplus.extension.api.IErrorCode;

public enum ResultCode implements IErrorCode {
    SUCCESS(200, "操作成功"),
    FAILED(500, "操作失败"),
    NO_LOGIN(600,"匿名用户无权限访问！请登录"),
    NO_AUTH(700,"无权限访问,请联系管理员！"),
    IP_NOT_NULL(40001,"IP地址为空"),
    IP_LAYOUT_ERROR(40002,"IP地址格式错误"),
    IP_NOT_PUBLIC(40003,"内网IP地址"),
    IP_NOT_EXIST(40004,"IP地址信息不存在");


    private long code;
    private String msg;

    private ResultCode(long code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public long getCode() {
        return code;
    }

    @Override
    public String getMsg() {
        return msg;
    }
}
